package ljl.codetop300;

public class _509_fib {

  static class test {
    public int fib(int n) {
      int a = 0;
      int b = 1;
      while (n-- > 0) {
        int c = a + b;
        a = b;
        b = c;
      }
      return a;
    }
  }
}
